package com.itheima.project.hystrix;

import com.itheima.project.basic.ResponseWrap;
import com.itheima.project.core.enums.trade.TradingEnum;
import com.itheima.project.exception.ProjectException;
import com.itheima.project.feign.CashPayFeign;
import com.itheima.project.utils.ResponseWrapBuild;
import com.itheima.project.vo.trade.TradingVo;
import org.springframework.stereotype.Component;

/**
 * @ClassName CashPayHystix.java
 * @Description CashPayFeign的Hystix
 */
@Component
public class CashPayHysrtix implements CashPayFeign {

    @Override
    public ResponseWrap<TradingVo> createCashTrading(TradingVo tradingVo) throws ProjectException {
        return ResponseWrapBuild.build(TradingEnum.CASH_PAY_FAIL,null);
    }

    @Override
    public ResponseWrap<TradingVo> refundCashTrading(TradingVo tradingVo) {
        return ResponseWrapBuild.build(TradingEnum.CASH_REFUND_FAIL,null);
    }
}
